package com.letv.business.flow.PlayFlowState;

import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;

import com.ledim.app.LeDimApplication;
import com.ledim.utils.LogUtil;
import com.letv.android.client.LetvSDK;
import com.letv.android.young.client.R;
import com.letv.business.flow.album.AlbumPlayFlow;
import com.letv.business.flow.album.AlbumPlayFlowObservable;
import com.letv.business.flow.album.model.AlbumPlayInfo;
import com.letv.core.api.LetvRequest;
import com.letv.core.api.MediaAssetApi;
import com.letv.core.bean.AlbumPayInfoBean;
import com.letv.core.bean.DataHull;
import com.letv.core.bean.TimestampBean;
import com.letv.core.bean.VideoFileBean;
import com.letv.core.bean.VideoPlayerBean;
import com.letv.core.constant.PlayConstant;
import com.letv.core.db.PreferencesManager;
import com.letv.core.network.volley.VolleyRequest;
import com.letv.core.network.volley.VolleyResponse;
import com.letv.core.network.volley.toolbox.SimpleResponse;
import com.letv.core.network.volley.toolbox.VolleyNoCache;
import com.letv.core.parser.VideoPlayerParser;
import com.letv.core.utils.LogInfo;
import com.letv.datastatistics.DataStatistics;
import com.letv.datastatistics.util.LetvErrorCode;
import com.polidea.statemachine.State;
import com.squareup.otto.Bus;

import org.greenrobot.eventbus.EventBus;

import javax.inject.Inject;


/**
 * Created by jipengfei on 2016/11/1.
 */
public abstract class BasePlayState extends State<PlayFlowProvider,PlayFlowActionInterface> {

    protected abstract void injectDependencies();

    public BasePlayState() {
        injectDependencies();
    }

    @Override
    public void onStateApplied() {
        EventBus.getDefault().register(this);
    }

    @Override
    public void onStateLeft() {
        EventBus.getDefault().unregister(this);
    }


    public static final String ALBUM_FLOW_TAG = "albumFlowTag_";
    public static final String REQUEST_VIDEO_PLAY_URL = ALBUM_FLOW_TAG + "videoPlayUrl";

    public AlbumPlayFlow mPlayFlow;


    public void setAlbumPlayFlow(AlbumPlayFlow playFlow)
    {
        mPlayFlow =  playFlow;
    }


}
